[obj-c] autorelease problem

Posted by BQuadra on Stack Overflow See other posts from Stack Overflow or by BQuadra
Published on 2010-05-15T01:31:16Z Indexed on 2010/05/15 1:34 UTC
Read the original article Hit count: 529

Filed under:
|
|
|

Why the NSArray allocated with arrayWithObjects dealloc automatically if already used by BObject object?? in teory NSArray must remain allocated all the BObject life time...

[[BObject alloc] initObjectName:@"oneObject" states:

[NSArray arrayWithObjects: [[State alloc] initStateName:@"stand_front" singleImg:[NSArray arrayWithObjects:[UIImage imageNamed:@"front_1.png"], nil]], [[State alloc] initStateName:@"front_walking" frames: [NSArray arrayWithObjects: [UIImage imageNamed:@"front_1.png"], [UIImage imageNamed:@"front_2.png"], [UIImage imageNamed:@"front_3.png"], [UIImage imageNamed:@"front_4.png"], [UIImage imageNamed:@"front_5.png"], [UIImage imageNamed:@"front_6.png"], [UIImage imageNamed:@"front_7.png"], [UIImage imageNamed:@"front_8.png"], nil] duration:0.8 repeat:0], nil] isSolid:TRUE];

© Stack Overflow or respective owner

Related posts about objective

Related posts about c